<template>
    <!-- // LTE网络MRO数据-小区(天) -->
    <index-card :indexCardTitle="indexCardTitle">
        <el-table :data="tableData" v-loading="loading">
            <el-table-column prop="starttime" label="开始时间" min-width="200">
                <template #default="scope">
                    {{ scope.row.starttime ? formatDateNormal(scope.row.starttime) : null }}
                </template>
            </el-table-column>
            <el-table-column prop="starttime" label="时间" min-width="200" />
            <el-table-column prop="cgi" label="小区CGI" min-width="200" />
            <el-table-column prop="enbid" label="LTE基站编号" min-width="200" />
            <el-table-column prop="cityName" label="地市名称" min-width="200" />
            <el-table-column prop="cityId" label="地市编号" min-width="200" />
            <el-table-column prop="vendorName" label="厂商名称" min-width="200" />
            <el-table-column prop="diff6Db110Total" label="主小区与邻小区的信号强度差值在6DBM内的样本数且服务小区信号强度大于等于-105dbm"
                min-width="200" />
            <el-table-column prop="diff6Db110Rate" label="主小区与邻小区的信号强度差值在6DBM内的样本数且服务小区信号强度大于等于-105dbm样本占比(%)"
                min-width="200" />
            <el-table-column prop="diff6DbTotal" label="主小区与邻小区的信号强度差值在6DBM内的样本数" min-width="200" />
            <el-table-column prop="diff6DbRate" label="主小区与邻小区的信号强度差值在6DBM内的样本数占比(%)" min-width="200" />
            <el-table-column prop="rsrpTotal" label="参考信号接收功率 (RSRP)样本总数" min-width="200" />
            <el-table-column prop="rsrpSum" label="参考信号接收功率 (RSRP)总和" min-width="200" />
            <el-table-column prop="rsrpAvg" label="参考信号接收功率 (RSRP)平均值" min-width="200" />
            <el-table-column prop="rsrpLtNeg110" label="RSRP<-110样本点数" min-width="200" />
            <el-table-column prop="rsrpLtNeg110Rate" label="RSRP<-110样本点比例(%)" min-width="200" />
            <el-table-column prop="rsrpGteqNeg95Rate" label="RSRP≥-95平均覆盖率(%)" min-width="200" />
            <el-table-column prop="rsrpGteqNeg110" label="RSRP≥-110样本点数" min-width="200" />
            <el-table-column prop="rsrpGteqNeg110Rate" label="RSRP≥-110平均覆盖率(%)" min-width="200" />
            <el-table-column prop="tadvTotal" label="时间s提前量 (TADV)样本总数" min-width="200" />
            <el-table-column prop="tadvSum" label="时间提s前量 (TADV)总和" min-width="200" />
            <el-table-column prop="tadvAvg" label="时间提s前量 (TADV)平均值" min-width="200" />
            <el-table-column prop="tadv00" label="时间提前量 (TADV)00" min-width="200" />
            <el-table-column prop="tadv01" label="时间提前量 (TADV)01" min-width="200" />
            <el-table-column prop="tadv02" label="时间提前量 (TADV)02" min-width="200" />
            <el-table-column prop="tadv03" label="时间提前量 (TADV)03" min-width="200" />
            <el-table-column prop="tadv04" label="时间提前量 (TADV)04" min-width="200" />
            <el-table-column prop="tadv05" label="时间提前量 (TADV)05" min-width="200" />
            <el-table-column prop="tadv06" label="时间提前量 (TADV)06" min-width="200" />
            <el-table-column prop="tadv07" label="时间提前量 (TADV)07" min-width="200" />
            <el-table-column prop="tadv08" label="时间提前量 (TADV)08" min-width="200" />
            <el-table-column prop="tadv09" label="时间提前量 (TADV)09" min-width="200" />
            <el-table-column prop="tadv10" label="时间提前量 (TADV)10" min-width="200" />
            <el-table-column prop="tadv11" label="时间提前量 (TADV)11" min-width="200" />
            <el-table-column prop="tadv12" label="时间提前量 (TADV)12" min-width="200" />
            <el-table-column prop="tadv13" label="时间提前量 (TADV)13" min-width="200" />
            <el-table-column prop="tadv14" label="时间提前量 (TADV)14" min-width="200" />
            <el-table-column prop="tadv15" label="时间提前量 (TADV)15" min-width="200" />
            <el-table-column prop="tadv16" label="时间提前量 (TADV)16" min-width="200" />
            <el-table-column prop="tadv17" label="时间提前量 (TADV)17" min-width="200" />
            <el-table-column prop="tadv18" label="时间提前量 (TADV)18" min-width="200" />
            <el-table-column prop="tadv19" label="时间提前量 (TADV)19" min-width="200" />
            <el-table-column prop="tadv20" label="时间提前量 (TADV)20" min-width="200" />
            <el-table-column prop="tadv21" label="时间提前量 (TADV)21" min-width="200" />
            <el-table-column prop="tadv22" label="时间提前量 (TADV)22" min-width="200" />
            <el-table-column prop="tadv23" label="时间提前量 (TADV)23" min-width="200" />
            <el-table-column prop="tadv24" label="时间提前量 (TADV)24" min-width="200" />
            <el-table-column prop="tadv25" label="时间提前量 (TADV)25" min-width="200" />
            <el-table-column prop="tadv26" label="时间提前量 (TADV)26" min-width="200" />
            <el-table-column prop="tadv27" label="时间提前量 (TADV)27" min-width="200" />
            <el-table-column prop="tadv28" label="时间提前量 (TADV)28" min-width="200" />
            <el-table-column prop="tadv29" label="时间提前量 (TADV)29" min-width="200" />
            <el-table-column prop="tadv30" label="时间提前量 (TADV)30" min-width="200" />
            <el-table-column prop="tadv31" label="时间提前量 (TADV)31" min-width="200" />
            <el-table-column prop="tadv32" label="时间提前量 (TADV)32" min-width="200" />
            <el-table-column prop="tadv33" label="时间提前量 (TADV)33" min-width="200" />
            <el-table-column prop="tadv34" label="时间提前量 (TADV)34" min-width="200" />
            <el-table-column prop="tadv35" label="时间提前量 (TADV)35" min-width="200" />
            <el-table-column prop="tadv36" label="时间提前量 (TADV)36" min-width="200" />
            <el-table-column prop="tadv37" label="时间提前量 (TADV)37" min-width="200" />
            <el-table-column prop="tadv38" label="时间提前量 (TADV)38" min-width="200" />
            <el-table-column prop="tadv39" label="时间提前量 (TADV)39" min-width="200" />
            <el-table-column prop="tadv40" label="时间提前量 (TADV)40" min-width="200" />
            <el-table-column prop="tadv41" label="时间提前量 (TADV)41" min-width="200" />
            <el-table-column prop="tadv42" label="时间提前量 (TADV)42" min-width="200" />
            <el-table-column prop="tadv43" label="时间提前量 (TADV)43" min-width="200" />
            <el-table-column prop="tadv44" label="时间提前量 (TADV)44" min-width="200" />
            <el-table-column prop="powerHeadroomTotal" label="UE发射功率余量 (POWERHEADROOM)样本总数" min-width="200" />
            <el-table-column prop="powerHeadroomSum" label="UE发射功率余量 (POWERHEADROOM)总和" min-width="200" />
            <el-table-column prop="powerHeadroomAvg" label="UE发射功率余量 (POWERHEADROOM)平均值" min-width="200" />
            <el-table-column prop="powerHeadroom00Rate" label="UE发射功率余量 (POWERHEADROOM)0样本点比例" min-width="200" />
        </el-table>
    </index-card>
</template>

<script setup>
import { ref } from "vue";
import { apiCommon, formatDateNormal } from "@/utils/index.js";
import * as qualityApi from "@/api/biz/networkQuality";
import mittBus from "@/utils/mittBus"; // mitt事件总线

mittBus.on("get4GIndexItemData", (params) => {
    getData(params)
});

const props = defineProps({
    indexCardTitle: {
        type: String,
        default: '',
    },
    rowsData: {
        type: Object,
        default: () => { },
    },
});

const tableData = ref([]);
let loading = ref(false);

const getData = async (params) => {
    // console.log('params', params)

    loading.value = true;
    tableData.value = await apiCommon(qualityApi.getLteMroDailyList, params);
    tableData.value = tableData.value.data;
    loading.value = false;
}

getData(props.rowsData);
</script>